More EL Examples
From Documentation
This documentation is for an older version of ZK. For the latest one, please click here.
${empty myMap}
${myMap[entry]}
${3+counter}
Tip: empty
is an operator used to test whether a map, a collection, an array or a string is null or empty.
Tip: myMap[entry]
is a way to access an element of a map. In other words, it is the same as myMap.get(entry)
in Java.
When an EL expression is used as an attribute value, it could return any kind of objects as long as the component accepts it. For example, the following expression will be evaluated to a Boolean object.
<window if="${some > 10}">
Standard implicit objects, such as param
and requestScope
, and ZK implicit objects, such as self
and page
, are supported to simplify the use.
<textbox value="${param.who} does ${param.what}"/>